#ifndef TABLEAU_H
#define TABLEAU_H

#include "includes.h"
#include "Team.h"
#include "Player.h"
#include "Card.h"
#include "CardInfo.h"


class Team;


/*$this->pileVitesse = array();
		$this->pileCombat = array();
		$this->pile200 = array();
		$this->pile100 = array();
		$this->pile75 = array();
		$this->pile50 = array();
		$this->pile25 = array();
		
		$this->botteCiterne = NULL;
		$this->botteIncreuvable = NULL;
		$this->botteAsVolant = NULL;
		$this->bottePrioritaire = NULL;*/


class Tableau {
public:
	explicit Tableau(Team* owningTeam);
	~Tableau();
	
	Team* getOwningTeam() { return owningTeam; }
	void setWinDistance(int winDistance) { this->winDistance = winDistance; }
	
	
	int numberOf200() const;
	int distance() const;
	
	bool canPlay(Player* player, CardID card) const;
	QList<CardID> play(CardID card, bool coupFourre = false);
	
	bool canRoll() const;
	int canRollDistance() const;
	
	int points();
	
	
	
public:
	QList<CardID> battlePile;
	QList<CardID> speedPile;
	QList<CardID> distanceArea;
	QHash<CardID,bool> safetyArea;
	
	
private:
	Team* owningTeam;
	int winDistance; // 700 or 1000 km
};

QDebug operator<<(QDebug dbg, const Tableau &tab);



#endif // TABLEAU_H
